package com.neu.flashmall.product.mapper;

import com.neu.flashmall.product.entity.PmsSkuInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
* @author 12615
* @description 针对表【pms_sku_info(sku信息)】的数据库操作Mapper
* @createDate 2022-07-13 23:04:59
* @Entity com.neu.flashmall.product.entity.PmsSkuInfo
*/
@Mapper
public interface PmsSkuInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(PmsSkuInfo record);

    int insertSelective(PmsSkuInfo record);

    PmsSkuInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PmsSkuInfo record);

    int updateByPrimaryKey(PmsSkuInfo record);

    List<PmsSkuInfo> selectAll(long spuId);

    List<PmsSkuInfo> selectBySkuName(String skuName);

    List<Long> selectBySpuId(Long spuId);

    List<PmsSkuInfo> selectBySkuName(@Param("skuName") String skuName,@Param("spuId") long spuId);

    List<PmsSkuInfo> selectAllBySpuId(Long spuId);

    BigDecimal getPrice(Long spuId);

    List<PmsSkuInfo> getAllData();

    List<Long> searchByKeyWord(String keyWord);
}
